﻿namespace BloggerBackup
{
    using log4net;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;
    using System.Xml;

    [DesignerGenerated]
    public class RestoreForm : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AddButton")]
        private Button _AddButton;
        private string _BackupPath;
        [AccessedThroughProperty("BloggerUserIDLabel")]
        private Label _BloggerUserIDLabel;
        [AccessedThroughProperty("BlogTitleLabel")]
        private Label _BlogTitleLabel;
        [AccessedThroughProperty("Cancel_Button")]
        private Button _Cancel_Button;
        [AccessedThroughProperty("ColumnHeader1")]
        private ColumnHeader _ColumnHeader1;
        [AccessedThroughProperty("ColumnHeader2")]
        private ColumnHeader _ColumnHeader2;
        [AccessedThroughProperty("ColumnHeader3")]
        private ColumnHeader _ColumnHeader3;
        [AccessedThroughProperty("ColumnHeader4")]
        private ColumnHeader _ColumnHeader4;
        [AccessedThroughProperty("ColumnHeader5")]
        private ColumnHeader _ColumnHeader5;
        [AccessedThroughProperty("FiftyPostsNoticeLabel")]
        private Label _FiftyPostsNoticeLabel;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label6")]
        private Label _Label6;
        [AccessedThroughProperty("Label7")]
        private Label _Label7;
        private static ILog _log;
        [AccessedThroughProperty("OK_Button")]
        private Button _OK_Button;
        [AccessedThroughProperty("OpenFileDialog1")]
        private OpenFileDialog _OpenFileDialog1;
        [AccessedThroughProperty("OverridePublishedDatePicker")]
        private DateTimePicker _OverridePublishedDatePicker;
        [AccessedThroughProperty("OverridePublishedTimePicker")]
        private DateTimePicker _OverridePublishedTimePicker;
        [AccessedThroughProperty("PasswordTextbox")]
        private TextBox _PasswordTextbox;
        [AccessedThroughProperty("PleaseNoteLabel")]
        private Label _PleaseNoteLabel;
        [AccessedThroughProperty("RestoredPostsLabel")]
        private Label _RestoredPostsLabel;
        [AccessedThroughProperty("RestoredPostsTitleLabel")]
        private Label _RestoredPostsTitleLabel;
        [AccessedThroughProperty("RestorePostListView")]
        private ListView _RestorePostListView;
        private BlogSetting _SelectedBlogSetting;
        [AccessedThroughProperty("SelectedPostsLabel")]
        private Label _SelectedPostsLabel;
        [AccessedThroughProperty("SelectedPostsTitleLabel")]
        private Label _SelectedPostsTitleLabel;
        private BloggerBackupSettings _Settings;
        [AccessedThroughProperty("TableLayoutPanel1")]
        private TableLayoutPanel _TableLayoutPanel1;
        [AccessedThroughProperty("TableLayoutPanel2")]
        private TableLayoutPanel _TableLayoutPanel2;
        [AccessedThroughProperty("TableLayoutPanel3")]
        private TableLayoutPanel _TableLayoutPanel3;
        [AccessedThroughProperty("TableLayoutPanel4")]
        private TableLayoutPanel _TableLayoutPanel4;
        [AccessedThroughProperty("UserIDTextBox")]
        private TextBox _UserIDTextBox;
        private IContainer components;

        [DebuggerNonUserCode]
        public RestoreForm()
        {
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.InitializeComponent();
        }

        private void AddButton_Click(object sender, EventArgs e)
        {
            this.AddFiles();
        }

        private void AddFiles()
        {
            this.OpenFileDialog1.InitialDirectory = this._BackupPath;
            if (this.RestorePostListView.Items.Count == 0x31)
            {
                Interaction.MsgBox("No more than 49 posts can be restored at a time.", MsgBoxStyle.OkOnly, "Too Many Posts Selected");
            }
            else
            {
                if (this.OpenFileDialog1.ShowDialog(this) == DialogResult.OK)
                {
                    if ((this.RestorePostListView.Items.Count + this.OpenFileDialog1.FileNames.Length) > 50)
                    {
                        Interaction.MsgBox("No more than 49 posts can be restored at a time.", MsgBoxStyle.OkOnly, "Too Many Posts Selected");
                        return;
                    }
                    foreach (string str in this.OpenFileDialog1.FileNames)
                    {
                        if (!str.EndsWith(".comments.xml"))
                        {
                            IEnumerator enumerator;
                            ListViewItem item = this.RestorePostListView.Items.Add(str);
                            XmlDocument document = new XmlDocument();
                            document.Load(str);
                            if (document.GetElementsByTagName("title").Count > 0)
                            {
                                item.SubItems.Add(document.GetElementsByTagName("title").Item(0).InnerText);
                            }
                            else
                            {
                                item.SubItems.Add("[NoTitle]");
                            }
                            item.SubItems.Add(Conversions.ToString(Conversions.ToDate(document.GetElementsByTagName("published").Item(0).InnerText)));
                            item.SubItems.Add(Conversions.ToString(Conversions.ToDate(document.GetElementsByTagName("updated").Item(0).InnerText)));
                            string text = "";
                            try
                            {
                                enumerator = document.GetElementsByTagName("author").GetEnumerator();
                                while (enumerator.MoveNext())
                                {
                                    XmlElement current = (XmlElement) enumerator.Current;
                                    text = text + current.InnerText + " ";
                                }
                            }
                            finally
                            {
                                if (enumerator is IDisposable)
                                {
                                    (enumerator as IDisposable).Dispose();
                                }
                            }
                            item.SubItems.Add(text);
                        }
                    }
                }
                this.SelectedPostsLabel.Text = Conversions.ToString(this.RestorePostListView.Items.Count);
            }
        }

        private void Cancel_Button_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (((disposing && (this.components != null)) ? 1 : 0) != 0)
                {
                    this.components.Dispose();
                }
            }
            finally
            {
                base.Dispose(disposing);
            }
        }

        public List<string> GetPostsToRestore(string backupPath, BloggerBackupSettings settings, BlogSetting selectedBlogSetting, ILog log, ref string userId, ref string password, ref DateTime overridePublishedDate)
        {
            this._BackupPath = backupPath;
            this._Settings = settings;
            _log = log;
            this._SelectedBlogSetting = selectedBlogSetting;
            List<string> list = new List<string>();
            this.RestoredPostsLabel.Text = Conversions.ToString(this._SelectedBlogSetting.LastRestoredPostCount);
            this.SelectedPostsLabel.Text = Conversions.ToString(0);
            this.UserIDTextBox.Text = selectedBlogSetting.UserName;
            this.PasswordTextbox.Text = "";
            this.BlogTitleLabel.Text = this._SelectedBlogSetting.Title + " (" + this._SelectedBlogSetting.BlogURL + ")";
            this.AddFiles();
            if (this.ShowDialog() == DialogResult.OK)
            {
                IEnumerator enumerator;
                try
                {
                    enumerator = this.RestorePostListView.Items.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        ListViewItem current = (ListViewItem) enumerator.Current;
                        list.Add(current.Text);
                    }
                }
                finally
                {
                    if (enumerator is IDisposable)
                    {
                        (enumerator as IDisposable).Dispose();
                    }
                }
                userId = this.UserIDTextBox.Text;
                password = this.PasswordTextbox.Text;
                if (this.OverridePublishedDatePicker.Checked)
                {
                    if (!DateTime.TryParse(this.OverridePublishedDatePicker.Value.ToShortDateString() + " " + this.OverridePublishedTimePicker.Value.ToLongTimeString(), out overridePublishedDate))
                    {
                        Interaction.MsgBox("Unable to parse the Override Published Date and Time. The original post values will be used.", MsgBoxStyle.OkOnly, null);
                        overridePublishedDate = new DateTime();
                    }
                    return list;
                }
                overridePublishedDate = new DateTime();
            }
            return list;
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(RestoreForm));
            this.TableLayoutPanel1 = new TableLayoutPanel();
            this.Cancel_Button = new Button();
            this.OK_Button = new Button();
            this.OpenFileDialog1 = new OpenFileDialog();
            this.RestorePostListView = new ListView();
            this.ColumnHeader1 = new ColumnHeader();
            this.ColumnHeader2 = new ColumnHeader();
            this.ColumnHeader3 = new ColumnHeader();
            this.ColumnHeader4 = new ColumnHeader();
            this.ColumnHeader5 = new ColumnHeader();
            this.AddButton = new Button();
            this.PleaseNoteLabel = new Label();
            this.FiftyPostsNoticeLabel = new Label();
            this.TableLayoutPanel2 = new TableLayoutPanel();
            this.TableLayoutPanel3 = new TableLayoutPanel();
            this.RestoredPostsLabel = new Label();
            this.SelectedPostsTitleLabel = new Label();
            this.SelectedPostsLabel = new Label();
            this.RestoredPostsTitleLabel = new Label();
            this.UserIDTextBox = new TextBox();
            this.BloggerUserIDLabel = new Label();
            this.PasswordTextbox = new TextBox();
            this.Label6 = new Label();
            this.BlogTitleLabel = new Label();
            this.Label7 = new Label();
            this.TableLayoutPanel4 = new TableLayoutPanel();
            this.OverridePublishedTimePicker = new DateTimePicker();
            this.OverridePublishedDatePicker = new DateTimePicker();
            this.Label1 = new Label();
            this.TableLayoutPanel1.SuspendLayout();
            this.TableLayoutPanel2.SuspendLayout();
            this.TableLayoutPanel3.SuspendLayout();
            this.TableLayoutPanel4.SuspendLayout();
            this.SuspendLayout();
            this.TableLayoutPanel1.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            this.TableLayoutPanel1.ColumnCount = 2;
            this.TableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50f));
            this.TableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50f));
            this.TableLayoutPanel1.Controls.Add(this.Cancel_Button, 1, 0);
            this.TableLayoutPanel1.Controls.Add(this.OK_Button, 0, 0);
            Point point = new Point(0x20a, 0x55);
            this.TableLayoutPanel1.Location = point;
            this.TableLayoutPanel1.Name = "TableLayoutPanel1";
            this.TableLayoutPanel1.RowCount = 1;
            this.TableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50f));
            Size size = new Size(0x92, 0x1d);
            this.TableLayoutPanel1.Size = size;
            this.TableLayoutPanel1.TabIndex = 1;
            this.Cancel_Button.Anchor = AnchorStyles.None;
            this.Cancel_Button.DialogResult = DialogResult.Cancel;
            point = new Point(0x4c, 3);
            this.Cancel_Button.Location = point;
            this.Cancel_Button.Name = "Cancel_Button";
            size = new Size(0x43, 0x17);
            this.Cancel_Button.Size = size;
            this.Cancel_Button.TabIndex = 1;
            this.Cancel_Button.Text = "Cancel";
            this.OK_Button.Anchor = AnchorStyles.None;
            point = new Point(3, 3);
            this.OK_Button.Location = point;
            this.OK_Button.Name = "OK_Button";
            size = new Size(0x43, 0x17);
            this.OK_Button.Size = size;
            this.OK_Button.TabIndex = 0;
            this.OK_Button.Text = "OK";
            this.OpenFileDialog1.DefaultExt = "*.XML";
            this.OpenFileDialog1.Filter = "Saved Post(s)|*.XML|All Files|*.*";
            this.OpenFileDialog1.Multiselect = true;
            this.OpenFileDialog1.Title = "Select Previously Backed Up Posts to Restore";
            this.RestorePostListView.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.RestorePostListView.Columns.AddRange(new ColumnHeader[] { this.ColumnHeader1, this.ColumnHeader2, this.ColumnHeader3, this.ColumnHeader4, this.ColumnHeader5 });
            this.RestorePostListView.FullRowSelect = true;
            point = new Point(12, 0x3e);
            this.RestorePostListView.Location = point;
            this.RestorePostListView.Name = "RestorePostListView";
            this.RestorePostListView.ShowGroups = false;
            size = new Size(0x29d, 0xb1);
            this.RestorePostListView.Size = size;
            this.RestorePostListView.TabIndex = 2;
            this.RestorePostListView.UseCompatibleStateImageBehavior = false;
            this.RestorePostListView.View = View.Details;
            this.ColumnHeader1.Text = "File Name";
            this.ColumnHeader1.Width = 0x52;
            this.ColumnHeader2.Text = "Post Tile";
            this.ColumnHeader2.Width = 0x134;
            this.ColumnHeader3.Text = "Published Date";
            this.ColumnHeader3.Width = 0x65;
            this.ColumnHeader4.Text = "Updated Date";
            this.ColumnHeader4.Width = 0x60;
            this.ColumnHeader5.Text = "Author";
            this.ColumnHeader5.Width = 0x4a;
            point = new Point(12, 0x21);
            this.AddButton.Location = point;
            this.AddButton.Name = "AddButton";
            size = new Size(0x54, 0x17);
            this.AddButton.Size = size;
            this.AddButton.TabIndex = 3;
            this.AddButton.Text = "Add Post(s)";
            this.AddButton.UseVisualStyleBackColor = true;
            this.PleaseNoteLabel.AutoSize = true;
            this.PleaseNoteLabel.Font = new Font("Microsoft Sans Serif", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.PleaseNoteLabel.ForeColor = Color.Red;
            this.PleaseNoteLabel.ImageAlign = ContentAlignment.TopLeft;
            point = new Point(3, 0);
            this.PleaseNoteLabel.Location = point;
            this.PleaseNoteLabel.Name = "PleaseNoteLabel";
            size = new Size(0x74, 13);
            this.PleaseNoteLabel.Size = size;
            this.PleaseNoteLabel.TabIndex = 4;
            this.PleaseNoteLabel.Text = "PLEASE NOTE:";
            this.FiftyPostsNoticeLabel.AutoSize = true;
            this.TableLayoutPanel2.SetColumnSpan(this.FiftyPostsNoticeLabel, 2);
            this.FiftyPostsNoticeLabel.ForeColor = Color.Blue;
            point = new Point(3, 13);
            this.FiftyPostsNoticeLabel.Location = point;
            this.FiftyPostsNoticeLabel.Name = "FiftyPostsNoticeLabel";
            size = new Size(0x296, 0x1a);
            this.FiftyPostsNoticeLabel.Size = size;
            this.FiftyPostsNoticeLabel.TabIndex = 5;
            this.FiftyPostsNoticeLabel.Text = manager.GetString("FiftyPostsNoticeLabel.Text");
            this.TableLayoutPanel2.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
            this.TableLayoutPanel2.ColumnCount = 2;
            this.TableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 75.85693f));
            this.TableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 24.14307f));
            this.TableLayoutPanel2.Controls.Add(this.PleaseNoteLabel, 0, 0);
            this.TableLayoutPanel2.Controls.Add(this.FiftyPostsNoticeLabel, 0, 1);
            this.TableLayoutPanel2.Controls.Add(this.TableLayoutPanel1, 1, 2);
            this.TableLayoutPanel2.Controls.Add(this.TableLayoutPanel3, 0, 2);
            point = new Point(12, 0x10f);
            this.TableLayoutPanel2.Location = point;
            this.TableLayoutPanel2.Name = "TableLayoutPanel2";
            this.TableLayoutPanel2.RowCount = 3;
            this.TableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 30.30303f));
            this.TableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 69.69697f));
            this.TableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 74f));
            size = new Size(0x29f, 0x75);
            this.TableLayoutPanel2.Size = size;
            this.TableLayoutPanel2.TabIndex = 6;
            this.TableLayoutPanel3.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.TableLayoutPanel3.ColumnCount = 2;
            this.TableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40.95427f));
            this.TableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 59.04573f));
            this.TableLayoutPanel3.Controls.Add(this.TableLayoutPanel4, 1, 0);
            this.TableLayoutPanel3.Controls.Add(this.RestoredPostsLabel, 1, 2);
            this.TableLayoutPanel3.Controls.Add(this.SelectedPostsLabel, 1, 1);
            this.TableLayoutPanel3.Controls.Add(this.Label1, 0, 0);
            this.TableLayoutPanel3.Controls.Add(this.RestoredPostsTitleLabel, 0, 2);
            this.TableLayoutPanel3.Controls.Add(this.SelectedPostsTitleLabel, 0, 1);
            point = new Point(3, 0x2d);
            this.TableLayoutPanel3.Location = point;
            this.TableLayoutPanel3.Name = "TableLayoutPanel3";
            this.TableLayoutPanel3.RowCount = 3;
            this.TableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Percent, 25f));
            this.TableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Percent, 25f));
            this.TableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Percent, 25f));
            size = new Size(0x1f7, 0x45);
            this.TableLayoutPanel3.Size = size;
            this.TableLayoutPanel3.TabIndex = 6;
            this.RestoredPostsLabel.AutoSize = true;
            point = new Point(0xd0, 0x2e);
            this.RestoredPostsLabel.Location = point;
            this.RestoredPostsLabel.Name = "RestoredPostsLabel";
            size = new Size(0, 13);
            this.RestoredPostsLabel.Size = size;
            this.RestoredPostsLabel.TabIndex = 4;
            this.SelectedPostsTitleLabel.AutoSize = true;
            point = new Point(3, 0x17);
            this.SelectedPostsTitleLabel.Location = point;
            this.SelectedPostsTitleLabel.Name = "SelectedPostsTitleLabel";
            size = new Size(0x51, 13);
            this.SelectedPostsTitleLabel.Size = size;
            this.SelectedPostsTitleLabel.TabIndex = 1;
            this.SelectedPostsTitleLabel.Text = "Selected Posts:";
            this.SelectedPostsLabel.AutoSize = true;
            point = new Point(0xd0, 0x17);
            this.SelectedPostsLabel.Location = point;
            this.SelectedPostsLabel.Name = "SelectedPostsLabel";
            size = new Size(0, 13);
            this.SelectedPostsLabel.Size = size;
            this.SelectedPostsLabel.TabIndex = 0;
            this.RestoredPostsTitleLabel.AutoSize = true;
            point = new Point(3, 0x2e);
            this.RestoredPostsTitleLabel.Location = point;
            this.RestoredPostsTitleLabel.Name = "RestoredPostsTitleLabel";
            size = new Size(0xc1, 13);
            this.RestoredPostsTitleLabel.Size = size;
            this.RestoredPostsTitleLabel.TabIndex = 2;
            this.RestoredPostsTitleLabel.Text = "Posts Attempted to be Restored Today:";
            this.UserIDTextBox.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
            point = new Point(0x72, 0xf5);
            this.UserIDTextBox.Location = point;
            this.UserIDTextBox.Name = "UserIDTextBox";
            size = new Size(0xbd, 20);
            this.UserIDTextBox.Size = size;
            this.UserIDTextBox.TabIndex = 8;
            this.BloggerUserIDLabel.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
            this.BloggerUserIDLabel.AutoSize = true;
            point = new Point(12, 0xf5);
            this.BloggerUserIDLabel.Location = point;
            this.BloggerUserIDLabel.Name = "BloggerUserIDLabel";
            size = new Size(0x53, 13);
            this.BloggerUserIDLabel.Size = size;
            this.BloggerUserIDLabel.TabIndex = 7;
            this.BloggerUserIDLabel.Text = "Blogger user ID:";
            this.PasswordTextbox.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
            point = new Point(0x1a8, 0xf5);
            this.PasswordTextbox.Location = point;
            this.PasswordTextbox.Name = "PasswordTextbox";
            size = new Size(0xbd, 20);
            this.PasswordTextbox.Size = size;
            this.PasswordTextbox.TabIndex = 10;
            this.PasswordTextbox.UseSystemPasswordChar = true;
            this.Label6.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
            this.Label6.AutoSize = true;
            point = new Point(0x144, 0xf5);
            this.Label6.Location = point;
            this.Label6.Name = "Label6";
            size = new Size(0x5e, 13);
            this.Label6.Size = size;
            this.Label6.TabIndex = 9;
            this.Label6.Text = "Blogger password:";
            this.BlogTitleLabel.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.BlogTitleLabel.AutoEllipsis = true;
            this.BlogTitleLabel.Font = new Font("Microsoft Sans Serif", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.BlogTitleLabel.ForeColor = Color.ForestGreen;
            this.BlogTitleLabel.ImageAlign = ContentAlignment.TopLeft;
            point = new Point(12, 9);
            this.BlogTitleLabel.Location = point;
            this.BlogTitleLabel.Name = "BlogTitleLabel";
            size = new Size(0x29d, 20);
            this.BlogTitleLabel.Size = size;
            this.BlogTitleLabel.TabIndex = 11;
            this.Label7.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.Label7.ForeColor = Color.Blue;
            point = new Point(0x66, 0x21);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(0x243, 0x1a);
            this.Label7.Size = size;
            this.Label7.TabIndex = 12;
            this.Label7.Text = "Please note that the restoring of Comments (\"*.comments.xml\" named files) is not yet supported. *.Comment.XML files will not be shown in the below list...";
            this.TableLayoutPanel4.ColumnCount = 2;
            this.TableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 54.3379f));
            this.TableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 45.6621f));
            this.TableLayoutPanel4.Controls.Add(this.OverridePublishedTimePicker, 1, 0);
            this.TableLayoutPanel4.Controls.Add(this.OverridePublishedDatePicker, 0, 0);
            this.TableLayoutPanel4.Dock = DockStyle.Fill;
            point = new Point(0xcd, 0);
            this.TableLayoutPanel4.Location = point;
            Padding padding = new Padding(0);
            this.TableLayoutPanel4.Margin = padding;
            this.TableLayoutPanel4.Name = "TableLayoutPanel4";
            this.TableLayoutPanel4.RowCount = 1;
            this.TableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Percent, 50f));
            size = new Size(0x12a, 0x17);
            this.TableLayoutPanel4.Size = size;
            this.TableLayoutPanel4.TabIndex = 0x15;
            this.OverridePublishedTimePicker.CustomFormat = "";
            this.OverridePublishedTimePicker.Dock = DockStyle.Top;
            this.OverridePublishedTimePicker.Enabled = false;
            this.OverridePublishedTimePicker.Format = DateTimePickerFormat.Time;
            point = new Point(0xa4, 3);
            this.OverridePublishedTimePicker.Location = point;
            this.OverridePublishedTimePicker.Name = "OverridePublishedTimePicker";
            this.OverridePublishedTimePicker.ShowUpDown = true;
            size = new Size(0x83, 20);
            this.OverridePublishedTimePicker.Size = size;
            this.OverridePublishedTimePicker.TabIndex = 1;
            this.OverridePublishedDatePicker.Checked = false;
            this.OverridePublishedDatePicker.CustomFormat = "F";
            this.OverridePublishedDatePicker.Dock = DockStyle.Top;
            this.OverridePublishedDatePicker.Format = DateTimePickerFormat.Short;
            point = new Point(3, 3);
            this.OverridePublishedDatePicker.Location = point;
            this.OverridePublishedDatePicker.Name = "OverridePublishedDatePicker";
            this.OverridePublishedDatePicker.ShowCheckBox = true;
            size = new Size(0x9b, 20);
            this.OverridePublishedDatePicker.Size = size;
            this.OverridePublishedDatePicker.TabIndex = 0;
            DateTime time = new DateTime(0x76c, 1, 1, 12, 0, 0, 0);
            this.OverridePublishedDatePicker.Value = time;
            this.Label1.AutoSize = true;
            point = new Point(3, 0);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0xa6, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x16;
            this.Label1.Text = "Override restored Published Date:";
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            this.CancelButton = this.Cancel_Button;
            size = new Size(0x2b5, 0x18f);
            this.ClientSize = size;
            this.Controls.Add(this.Label7);
            this.Controls.Add(this.BlogTitleLabel);
            this.Controls.Add(this.UserIDTextBox);
            this.Controls.Add(this.BloggerUserIDLabel);
            this.Controls.Add(this.PasswordTextbox);
            this.Controls.Add(this.Label6);
            this.Controls.Add(this.TableLayoutPanel2);
            this.Controls.Add(this.AddButton);
            this.Controls.Add(this.RestorePostListView);
            this.Icon = (Icon) manager.GetObject("$this.Icon");
            size = new Size(0x2c5, 0x1b3);
            this.MinimumSize = size;
            this.Name = "RestoreForm";
            this.Text = "Select Post(s) to Restore";
            this.TableLayoutPanel1.ResumeLayout(false);
            this.TableLayoutPanel2.ResumeLayout(false);
            this.TableLayoutPanel2.PerformLayout();
            this.TableLayoutPanel3.ResumeLayout(false);
            this.TableLayoutPanel3.PerformLayout();
            this.TableLayoutPanel4.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        private void OK_Button_Click(object sender, EventArgs e)
        {
            if ((this.UserIDTextBox.Text.Length == 0) | (this.PasswordTextbox.Text.Length == 0))
            {
                Interaction.MsgBox("The valid Blogger User ID and Password for " + this._SelectedBlogSetting.Title + " (" + this._SelectedBlogSetting.BlogURL + ") is required to restore posts. Please enter the User Id and/or password", MsgBoxStyle.OkOnly, null);
            }
            else
            {
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }

        private void OverridePublishedDatePicker_ValueChanged(object sender, EventArgs e)
        {
            if (this.OverridePublishedDatePicker.Checked)
            {
                this.OverridePublishedTimePicker.Enabled = true;
            }
            else
            {
                this.OverridePublishedTimePicker.Enabled = false;
            }
        }

        private void RestorePostListView_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Delete)
            {
                IEnumerator enumerator;
                try
                {
                    enumerator = this.RestorePostListView.SelectedItems.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        ((ListViewItem) enumerator.Current).Remove();
                    }
                }
                finally
                {
                    if (enumerator is IDisposable)
                    {
                        (enumerator as IDisposable).Dispose();
                    }
                }
                this.SelectedPostsLabel.Text = Conversions.ToString(this.RestorePostListView.Items.Count);
            }
        }

        private void RestorePostListView_SelectedIndexChanged(object sender, EventArgs e)
        {
        }

        internal virtual Button AddButton
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AddButton;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.AddButton_Click);
                if (this._AddButton != null)
                {
                    this._AddButton.Click -= handler;
                }
                this._AddButton = value;
                if (this._AddButton != null)
                {
                    this._AddButton.Click += handler;
                }
            }
        }

        internal virtual Label BloggerUserIDLabel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._BloggerUserIDLabel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._BloggerUserIDLabel = value;
            }
        }

        internal virtual Label BlogTitleLabel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._BlogTitleLabel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._BlogTitleLabel = value;
            }
        }

        internal virtual Button Cancel_Button
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Cancel_Button;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.Cancel_Button_Click);
                if (this._Cancel_Button != null)
                {
                    this._Cancel_Button.Click -= handler;
                }
                this._Cancel_Button = value;
                if (this._Cancel_Button != null)
                {
                    this._Cancel_Button.Click += handler;
                }
            }
        }

        internal virtual ColumnHeader ColumnHeader1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ColumnHeader1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ColumnHeader1 = value;
            }
        }

        internal virtual ColumnHeader ColumnHeader2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ColumnHeader2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ColumnHeader2 = value;
            }
        }

        internal virtual ColumnHeader ColumnHeader3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ColumnHeader3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ColumnHeader3 = value;
            }
        }

        internal virtual ColumnHeader ColumnHeader4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ColumnHeader4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ColumnHeader4 = value;
            }
        }

        internal virtual ColumnHeader ColumnHeader5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ColumnHeader5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ColumnHeader5 = value;
            }
        }

        internal virtual Label FiftyPostsNoticeLabel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._FiftyPostsNoticeLabel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._FiftyPostsNoticeLabel = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label6 = value;
            }
        }

        internal virtual Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual Button OK_Button
        {
            [DebuggerNonUserCode]
            get
            {
                return this._OK_Button;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.OK_Button_Click);
                if (this._OK_Button != null)
                {
                    this._OK_Button.Click -= handler;
                }
                this._OK_Button = value;
                if (this._OK_Button != null)
                {
                    this._OK_Button.Click += handler;
                }
            }
        }

        internal virtual OpenFileDialog OpenFileDialog1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._OpenFileDialog1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._OpenFileDialog1 = value;
            }
        }

        internal virtual DateTimePicker OverridePublishedDatePicker
        {
            [DebuggerNonUserCode]
            get
            {
                return this._OverridePublishedDatePicker;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.OverridePublishedDatePicker_ValueChanged);
                if (this._OverridePublishedDatePicker != null)
                {
                    this._OverridePublishedDatePicker.ValueChanged -= handler;
                }
                this._OverridePublishedDatePicker = value;
                if (this._OverridePublishedDatePicker != null)
                {
                    this._OverridePublishedDatePicker.ValueChanged += handler;
                }
            }
        }

        internal virtual DateTimePicker OverridePublishedTimePicker
        {
            [DebuggerNonUserCode]
            get
            {
                return this._OverridePublishedTimePicker;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._OverridePublishedTimePicker = value;
            }
        }

        internal virtual TextBox PasswordTextbox
        {
            [DebuggerNonUserCode]
            get
            {
                return this._PasswordTextbox;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._PasswordTextbox = value;
            }
        }

        internal virtual Label PleaseNoteLabel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._PleaseNoteLabel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._PleaseNoteLabel = value;
            }
        }

        internal virtual Label RestoredPostsLabel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._RestoredPostsLabel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._RestoredPostsLabel = value;
            }
        }

        internal virtual Label RestoredPostsTitleLabel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._RestoredPostsTitleLabel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._RestoredPostsTitleLabel = value;
            }
        }

        internal virtual ListView RestorePostListView
        {
            [DebuggerNonUserCode]
            get
            {
                return this._RestorePostListView;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.RestorePostListView_SelectedIndexChanged);
                KeyEventHandler handler2 = new KeyEventHandler(this.RestorePostListView_KeyUp);
                if (this._RestorePostListView != null)
                {
                    this._RestorePostListView.SelectedIndexChanged -= handler;
                    this._RestorePostListView.KeyUp -= handler2;
                }
                this._RestorePostListView = value;
                if (this._RestorePostListView != null)
                {
                    this._RestorePostListView.SelectedIndexChanged += handler;
                    this._RestorePostListView.KeyUp += handler2;
                }
            }
        }

        internal virtual Label SelectedPostsLabel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._SelectedPostsLabel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._SelectedPostsLabel = value;
            }
        }

        internal virtual Label SelectedPostsTitleLabel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._SelectedPostsTitleLabel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._SelectedPostsTitleLabel = value;
            }
        }

        internal virtual TableLayoutPanel TableLayoutPanel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TableLayoutPanel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TableLayoutPanel1 = value;
            }
        }

        internal virtual TableLayoutPanel TableLayoutPanel2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TableLayoutPanel2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TableLayoutPanel2 = value;
            }
        }

        internal virtual TableLayoutPanel TableLayoutPanel3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TableLayoutPanel3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TableLayoutPanel3 = value;
            }
        }

        internal virtual TableLayoutPanel TableLayoutPanel4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TableLayoutPanel4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TableLayoutPanel4 = value;
            }
        }

        internal virtual TextBox UserIDTextBox
        {
            [DebuggerNonUserCode]
            get
            {
                return this._UserIDTextBox;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._UserIDTextBox = value;
            }
        }
    }
}

